package com.start.querydsl;

import com.alibaba.druid.pool.DruidDataSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.sql.DataSource;

/**
 * Created by IntelliJ IDEA.
 * User: wk
 * Date: 2017-07-21 下午2:54
 */
@Configuration
public class DataBaseConfig {
    @Bean
    public DataSource dataSource() {
        DruidDataSource druidDataSource = new DruidDataSource();
        druidDataSource.setUrl("jdbc:mysql://127.0.0.1:3306/hongbao?characterEncoding=UTF-8");
        druidDataSource.setUsername("root");
        druidDataSource.setPassword("qq123456");
        return druidDataSource;
    }
}
